package com.yedean.mall.token;

import lombok.Data;

import java.util.Date;

/**
 * RefreshTokenEntity
 *
 * @author yedean
 * @date 2022/8/17
 */
@Data
public class RefreshTokenEntity {


    public final static String ACCESS_TOKEN_KEY = "accessToken";

    public final static String USER_INFO_KEY = "userInfo";

    private String refreshToken;

    private String accessToken;

    private UserInfo userInfo;

    private Date expireIn;

    public RefreshTokenEntity(String refreshToken, String accessToken, UserInfo userInfo) {
        this(refreshToken, accessToken, userInfo, null);
    }

    public RefreshTokenEntity(String refreshToken, String accessToken, UserInfo userInfo, Date expireIn) {
        this.refreshToken = refreshToken;
        this.accessToken = accessToken;
        this.userInfo = userInfo;
        this.expireIn = expireIn;
    }
}
